package com.zw.yzk.kabu.model;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by zhanwei on 2017/3/6.
 */

public class ShoppingCartModel {

    //店铺名称
    private String shopName;
    //店铺id
    private int id;
    //店铺下的商品
    private List<ShoppingCartGoodsModel> models;
    //店铺是否选中
    private boolean selected;
    //店铺是否处于编辑状态
    private boolean editMode;
    //店铺中选中的商品总额
    private float selectedCoast;

    public boolean isEditMode() {
        return editMode;
    }

    public void setEditMode(boolean editMode) {
        this.editMode = editMode;
    }

    public float getSelectedCoast() {
        return selectedCoast;
    }

    public void setSelectedCoast(float selectedCoast) {
        this.selectedCoast = selectedCoast;
    }

    public ShoppingCartModel() {
        models = new ArrayList<>();
    }

    public String getShopName() {
        return shopName;
    }

    public void setShopName(String shopName) {
        this.shopName = shopName;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public List<ShoppingCartGoodsModel> getModels() {
        return models;
    }

    public void setModels(List<ShoppingCartGoodsModel> models) {
        if (models != null) {
            this.models.addAll(models);
        }
    }

    public void addModels(ShoppingCartGoodsModel model) {
        this.models.add(model);
    }

    public boolean isSelected() {
        return selected;
    }

    public void setSelected(boolean selected) {
        this.selected = selected;
    }
}
